﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="QueryWorkTrainingRecord.ascx.vb" Inherits="WebForm_ManageEnlistment_QueryWorkTrainingRecord" %>
<%@ Register Src="../CommonControl/VolunteerQueryControl.ascx" TagName="VolunteerQueryControl"
    TagPrefix="uc1" %>
<%@ Register Src="~/WebForm/CommonControl/AnnualControl.ascx" TagName="AnnualControl"
    TagPrefix="My" %>
<div align="center">
    <table width="95%">
        <tr>
            <td class="Section" align="left">
                <asp:Label ID="lblVolunteerQueryCondition" runat="server" meta:resourcekey="lblVolunteerQueryCondition"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <table>
                    <tr>
                        <td align="left">
                            <uc1:VolunteerQueryControl ID="VolunteerQueryControl1" runat="server" LoadOnStartUp="true" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td class="Section" align="left">
                <asp:Label ID="lblTrainingCourseQueryCondition" runat="server" meta:resourcekey="lblTrainingCourseQueryCondition"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <table width="100%">
                    <tr>
                        <td align="right">
                            <asp:Label ID="lblAnnual" runat="server" meta:resourcekey="lblAnnual"></asp:Label>
                        </td>
                        <td  align="left">
                            <My:AnnualControl ID="AnnualControl1" runat="server" />
                        </td>
                        <td align="right">
                            <asp:Label ID="lblUOrganizationID" runat="server" Text="<%$ Resources:UOrganizationID %>"></asp:Label>
                        </td>
                        <td align="left">
                            <asp:DropDownList ID="ddlUOrganizationID" runat="server" DataSourceID="ObjectDataSource_UOrganizationData"
                                DataTextField="OrganizationName" DataValueField="UOrganizationID">
                            </asp:DropDownList>
                            <asp:ObjectDataSource ID="ObjectDataSource_UOrganizationData" runat="server" OldValuesParameterFormatString="original_{0}"
                                SelectMethod="BLL_Select" TypeName="BLL_BLL_VOrganizationData"></asp:ObjectDataSource>
                        </td>
                        <td align="right">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <asp:Label ID="lblCheckStatus" runat="server" Text="<%$ Resources:CheckStatus %>"></asp:Label>
                        </td>
                        <td align="left">
                            <asp:DropDownList ID="ddlCheckStatus" runat="server" DataSourceID="SqlDataSource2"
                                DataTextField="Text" DataValueField="Value">
                            </asp:DropDownList>
                            <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:connStr %>"
                                SelectCommand="SELECT [Value], [Text] FROM [CodeMapping] WHERE (([TableName] = @TableName) AND ([ColumnName] = @ColumnName))">
                                <SelectParameters>
                                    <asp:Parameter DefaultValue="TrainingRegister" Name="TableName" Type="String" />
                                    <asp:Parameter DefaultValue="CheckStatus" Name="ColumnName" Type="String" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </td>
                        <td align="right">
                            <asp:Label ID="lblItemType" runat="server" Text="課程類型"></asp:Label>
                        </td>
                        <td align="left">
                            <asp:DropDownList ID="ddlItemType" runat="server" DataSourceID="sdsItemType"
                                DataTextField="Text" DataValueField="Value">
                            </asp:DropDownList>
                            <asp:SqlDataSource ID="sdsItemType" runat="server" ConnectionString="<%$ ConnectionStrings:connStr %>"
                                SelectCommand="SELECT [Value], [Text] FROM [CodeMapping] WHERE (([TableName] = @TableName) AND ([ColumnName] = @ColumnName))">
                                <SelectParameters>
                                    <asp:Parameter DefaultValue="CleanPlan" Name="TableName" Type="String" />
                                    <asp:Parameter DefaultValue="ItemType" Name="ColumnName" Type="String" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </td>
                        <td align="right">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td>
                        
                        </td>
                        <td align="left">
                            <asp:Button ID="btnQuery" runat="server" Text="<%$ Resources:Query %>" />
                            <%--<asp:Button ID="btnExport" runat="server" Text="<%$ Resources:Export %>" Width="88px" />--%>
                        </td>
                        <td align="right">
                            &nbsp;
                        </td>
                        <td align="right">
                            &nbsp;
                        </td>
                        <td align="right">
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </td>
        </tr>        
    </table>
</div>
<My:MyGridView ID="GridView1" runat="server" SkinID="pager" AllowHoverSelect="True"
    AllowHoverEffect="True" MySortDirection="Ascending" AutoGenerateColumns="False" meta:resourcekey="gv">
    <Columns>
       <My:VolunteerIDBoundField DataField="VolunteerID" HeaderText="<%$ Resources:VolunteerID %>"
            ReadOnly="True" SortExpression="VolunteerID" />
  <%--      <asp:BoundField DataField="VolunteerID" HeaderText="<%$ Resources:VolunteerID %>"
            SortExpression="VolunteerID" />--%>
        <asp:BoundField DataField="VolunteerName" HeaderText="<%$ Resources:VolunteerName %>"
            SortExpression="VolunteerName" />
        <asp:BoundField DataField="ItemTypeName" HeaderText="<%$ Resources:ItemTypeName %>" SortExpression="ItemTypeName" />
        <asp:BoundField DataField="StartDate" HeaderText="<%$ Resources:StartDate %>" SortExpression="StartDate" />
<%--        <asp:BoundField DataField="GroupTypeText" HeaderText="<%$ Resources:GroupTypeText %>"
            SortExpression="GroupTypeText" />--%>
        <asp:BoundField DataField="GroupName" HeaderText="<%$ Resources:GroupName %>" SortExpression="GroupName" />
        <asp:BoundField DataField="AllHour" HeaderText="<%$ Resources:AllHour %>" SortExpression="AllHour" />
        <asp:BoundField DataField="CheckStatusText" HeaderText="<%$ Resources:CheckStatusText %>"
            SortExpression="CheckStatusText" />
    </Columns>
</My:MyGridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
    SelectMethod="BLL_Select" TypeName="BLL_ManageEnlistment_QueryWorkTrainingRecord">
    <SelectParameters>
  <%--      <asp:Parameter Name="Region" Type="String" />
        <asp:Parameter Name="Region2" Type="String" />--%>
        <asp:Parameter Name="VOrganizationID" Type="Int32" />
        <asp:Parameter Name="VolunteerId" Type="String" />
        <asp:Parameter Name="VolunteerName" Type="String" />
        <asp:Parameter Name="TEL" Type="String" />
        <asp:Parameter Name="CheckStatus" Type="String" />
        <asp:Parameter Name="UOrganizationID" Type="String" />
        <asp:Parameter Name="Annual" Type="String" />
        <asp:Parameter Name="ItemType" Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>            